package com.sun.common.authoriza.provider;

import com.sun.common.model.UserModel;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.LinkedHashMap;

/**
 * <pre>
 * Title :  当前用户
 * </pre>
 *
 * @author : SunJiYong
 * @since : 2022-01-13
 **/
public class CurrentUser extends User {

    private UserModel currentUser;

    public UserModel  getCurrentUser(){
        return currentUser;
    }

    public CurrentUser(String username, String password, Collection<? extends GrantedAuthority> authorities , UserModel user) {
        super(username, password, authorities);
        this.currentUser=user;
    }

}
